﻿using System.Collections.Generic;
using System.Linq;

namespace Shp.Web.Models.Contracts
{
    public interface IRepository<T> where T: class
    {
        /// <summary>
        /// Gets an IQueryable sequence of entities of type T.
        /// </summary>
        /// <returns></returns>
        IQueryable<T> Queryable();

        /// <summary>
        /// Gets an IEnumerable sequence of all entites of type T.
        /// </summary>
        /// <returns></returns>
        IEnumerable<T> All();
    }
}
